
import requests,json


key = "13d32afd7f95632eefa772ea0d7abec3"
# 天气查询
def weather_req(key,location):
    url = 'https://restapi.amap.com/v3/weather/weatherInfo?'
    params = {"key":key,
              "location":location,

             }
    r = requests.get(url,params)
    results = r.json()['now']
    return results
